//请求统一管理
import requests from "@/api/requests";

export const reqLogin=(username,password)=>requests({url:`/user/login?username=${username}&password=${password}`,method:'post'})
export const reqRegister=(username,password)=>requests({url:`/user/register?username=${username}&password=${password}`,method:'post'})
export const reqUpdateSignature=(signaturn)=>requests({url:`/user/update?signaturn=${signaturn}`,method:'post'})
export const reqLogout=()=>requests({url:'/user/logout',method:'get'})
export const reqFindAll=()=>requests({url:'/user/findAll',method:'get'})
export const reqCategoryFindAll=()=>requests({url:'/category/findAll',method:'get'})
export const reqCategoryUpdateInfo=(data)=>requests({url:'/category/admin/update',method:'post',data})
export const reqCategoryDeleteInfo=(id)=>requests({url:`/category/admin/delete?id=${id}`,method:'post'})
export const reqCategoryAddInfo=(data)=>requests({url:'/category/admin/add',method:'post',data})
